<?php
/**
* @package Joomla.Tutorials
* @subpackage Components
* @link http://dev.joomla.org/component/option,com_jdwiki/
Itemid,31/id,tutorials:components/
* @license GNU/GPL
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
JHTML::stylesheet('default.css', 'administrator/components/com_accessrule/css/');
JHTML::script('default.js', 'administrator/components/com_accessrule/js/');  

// Require the base controller
require_once( JPATH_COMPONENT.DS.'controllers'.DS.'controller.php' );
// Require specific controller if requested
if($controller = JRequest::getWord('controller')) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
	if (file_exists($path)) {
		require_once $path;
	} else {
		$controller = '';
	}
}
// Create the controller
$classname = 'AccessrulesController'.$controller;
$controller = new $classname( );
// Perform the Request task
$controller->execute( JRequest::getVar( 'task' ) );
// Redirect if set by the controller
$controller->redirect();
?>